<template>
	<view>
		<view>
			<view class="hotsptext">热搜排行榜</view>
		</view>


		<view class="ht">
			<view class="Hotsp">
				<view v-for="(item,index) in hot_sp">
					<span v-if="index < 3" class="hotone">Top{{ index + 1 }}</span>
					<hot :key="item.objectId" :hotsp="item">

					</hot>
					
				</view>

			</view>
		</view>


	</view>
</template>

<script>
	export default {
		data() {
			return {
				hot_sp: []

			}
		},

		methods: {

		},
		onShow() {

			let url = `/1.1/classes/bscs`
			this.$get(url).then(res => {
				uni.stopPullDownRefresh()
				// console.log(res)
				let {
					results
				} = res
				if (results.length) {
					// this.list=this.list.concat(res.results)
					// return


					this.hot_sp = res.results
					this.hot_sp.sort((a,b)=>b.sou-a.sou)

				}
				// console.log(this.list)
				// console.log(this.hot_sp)
			})
			// console.log(this.list)

			// console.log(this.list)
		}
	}
</script>

<style>
	.hotone {
		color: red;
		font-size: 4vw;
		font-weight: bold;
		margin-top: 20px;
	}

	.hotsptext {
		font-size: 10vw;
	}

	.Hotsp {
		width: 92%;
		margin: 0 auto;

		/* justify-content: space-around; */
	}

	.ht {
		width: 97%;
		border: 1px solid black;
		margin: 0 auto;
		border-radius: 1%;



	}

	/* .heard{
		height: 10vw;
		border: 1px solid black;
		border-bottom: 0;
		border-radius: 10%;
	} */
</style>